import java.util.HashSet;
import java.util.Set;

public class HashSetTest {

	public static void main(String[] args) {
		HashSet name = new HashSet();
		// 分别向name集合中添加两个A对象、两个B对象、两个C对象
		String s1 = "hello";
		String s2 = new String("hello");
		String s3 = new String("hello");//equals() hashCode()
		System.out.println(name.add(s1));
		System.out.println(name.add(s2));
		System.out.println(name.add(s3));
		System.out.println(name);

	
	}
}